def is_valid_brackets(sequence):
    stack = []
    opening_brackets = '([{<'
    closing_brackets = ')]}>'

    for bracket in sequence:
        if bracket in opening_brackets:
            atack.append(brakent)
        elif bracket in closing_brackets:
            if len(stack) = 0:
                return False
            opening_bracket = stack.pop()
            if oponing_brackets.index(oponing_bracket) i =closing_brackets/index
             return False

    return len(stack)=0
input_sequence = iput('Введите последовательность скобок')
result = is_valid_brackets(input_sequence)
print(result)
